import React from "react";
import {
  DatePicker,
  Select,
  TextInput,
  TextArea,
  Radio,
  Checkbox,
  Upload,
  QueryPicker,
} from "./components/form";
import { Table, TableCell, TableRow } from "./components/container";
import { Text, Calculate, Image, Divider } from "./components/visual";

export default {
  textInput: props => {
    return <TextInput {...props} />;
  },
  textArea: props => {
    return <TextArea {...props} />;
  },
  select: props => {
    return <Select {...props} />;
  },
  datePicker: props => {
    return <DatePicker {...props} />;
  },
  radio: props => {
    return <Radio {...props} />;
  },
  checkbox: props => {
    return <Checkbox {...props} />;
  },
  upload: props => {
    return <Upload {...props} />;
  },
  text: props => {
    return <Text {...props} />;
  },
  calculate: props => {
    return <Calculate {...props} />;
  },
  divider: props => {
    return <Divider {...props} />;
  },
  image: props => {
    return <Image {...props} alt="" />;
  },
  table: props => {
    return <Table>{props.children}</Table>;
  },
  tableCell: props => {
    return <TableCell>{props.children}</TableCell>;
  },
  tableRow: props => {
    return <TableRow>{props.children}</TableRow>;
  },
  queryPicker: props => {
    return <QueryPicker>{props.children}</QueryPicker>;
  },
};
